<?php
/* --------------------------------------------------------------
   GMLangFileMaster.php 2008-08-10 gambio
   Gambio OHG
   http://www.gambio.de
   Copyright (c) 2008 Gambio OHG
   Released under the GNU General Public License (Version 2)
   [http://www.gnu.org/licenses/gpl-2.0.html]
   --------------------------------------------------------------


   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(boxes.php,v 1.32 2003/05/27); www.oscommerce.com 
   (c) 2003	 nextcommerce (boxes.php,v 1.11 2003/08/13); www.nextcommerce.org
   (c) 2003 XT-Commerce - community made shopping http://www.xt-commerce.com ($Id: boxes.php 899 2005-04-29 02:40:57Z hhgag $)

   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/

  class GMLangFileMaster 
  {
    function GMLangFileMaster() 
    { 
    }
    
    function define_lang_file_content($file_path)
    {
    	$sql = '
    		SELECT
    			c.constant_name 	AS constant_name,
    			c.constant_value 	AS constant_value
    		FROM
    			gm_lang_files AS f LEFT JOIN gm_lang_files_content AS c USING (lang_files_id)
    		WHERE
    			f.file_path = "'.$file_path.'"
    	';
    	$result = xtc_db_query($sql);
    	
    	while(($row = xtc_db_fetch_array($result) )) 
    	{
    		$cmd = "define('".$row['constant_name']."', '".$row['constant_value']."'); ";
    		eval($cmd);
    	}
    }
		

  }
?>